package com.wxy.demo.this_;

/**
 * <p>
 *
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/6/8 9:57
 */
public class Date {

    public int year;
    public int month;
    public int day;

    public Date() {
//        this.setDate1(2022, 2, 2);
        this(2022, 22, 22);
    }

    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void setDate(int year, int month, int day) {
        year = year;
        month = month;
        day = day;
    }

    public void setDate1(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void printDate() {
        System.out.println(year + "/" + month + "/" + day);
    }

    public static void main(String[] args) {
        Date d = new Date();
        d.setDate(2022, 2, 22);
        d.printDate();
        d.setDate1(2022, 2, 22);
        d.printDate();
        Date d1 = new Date();
        d1.printDate();
    }
}
